Pipe Network - General Rules

This section outlines rules for using ML function in the Pipe Network context.

Languages

Functions that interact with the Pipe Network start with ML (e.g., MLAxisRel, MLPrfWriteOScale, or MLMstRel).

These functions can be used in all the Programming Languages.

BlockID Inputs

The BlockID input is a DINT ID.

It is the second input to a Pipe Network function when using the FFLD Language:

Example of BlockID Inputs

The BlockID input is the first one if programming in the ST Language:

MLGearRatSlp( BlockID (*DINT*) );

This input identifies the block in the Pipe Network the function interacts with.

If using the graphical Pipe Network Editor, the used variable starts with PipeNetwork.xxx.

The exception is if it is acting on a CAM profile, then the input is named ProfileID and the variable starts with Profiles.xxx.


  • When selecting a Pipe Block as the BlockID for an ML function, choose a Pipe Block with the same type which is in the name of the ML function.

    Example: MLMstxxx functions expect a Master block to be chosen for the BlockID.
    MLAxisxxx functions need an Axis block to be chosen for the AxisID input and MLPrfxxx functions need a Profile entered for ProfileID, etc.

Output Status

Most Pipe Network functions have a default Boolean output labeled either Q or OK:

Example of Output Status

What is the Difference between Q and OK?

  • OK returns True when the function successfully executes.
  • Q output is initially set to 0 (zero) until the first time the block is successfully executed in a running program.
    • After this execution, the Q output is set to 1.
    • It remains to 1 until the function does NOT execute successfully.
    • Alternately, after an unsuccessful execution the Q output is set to 0 (zero).
    • It remains to 0 (zero) until a successful execution resumes.

Difference between Q and OK

Figure 1: Execution Not Successful

When Q is Set to TRUE

Verify the description for each individual function block to be sure how its Q output is behaving.

  • Some functions change the Q output from low to high immediately after it starts executing.
  • Others (including most functions that command motion) wait to change the output until the function has completely finished executing.

Input Parameters

  • The En input parameter, which is used to execute the function, is not edge-triggered.
    • If a function is seen in the PLC code and its En input is positive, the function executes.
  • Example: A MLAxisRel command continuously executes relative moves in a program if it is called each program cycle; thus it acts as a Run/Jog command if continually commanded.

Missing Input Parameters

All inputs to a function must be entered for code to compile.

Position versus Distance

  • Position is a value defined in a coordinate system.
  • DeltaPosition is a relative measure related to technical units.
    • It is the difference between two positions.

Default Block Parameters

The parameters set when initializing a Pipe Network block are used as defaults when calling functions.

  • These parameters can be modified in a program by using specific functions to set these values.
    • If a value is never set in a program the parameter entered during initialization is used.
  • Example: When making a Master relative move (MLMstRel) you input the DeltaPosition but not the velocity or acceleration.
    You can set the velocity for the move by using the MLMstWriteSpeed function before calling the relative move.
    If the speed is not set in the program, the default parameter entered during the initialization (i.e., in the properties dialog box of the Pipe Blocks) is used.

Concept Link IconSee Also